//
//  ShopOrderListCell.m
//  BaseFrame
//
//  Created by wingfac on 2017/8/14.
//  Copyright © 2017年 com.mxh. All rights reserved.
//

#import "ShopOrderListCell.h"
@interface ShopOrderListCell()
@property (nonatomic,strong)UILabel *title;
@property (nonatomic,strong)UILabel *content;

@property (nonatomic,strong)UIView *bgView;
@property (nonatomic,strong)UIView *line;
@end
@implementation ShopOrderListCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.contentView.backgroundColor = getColor(@"ebebf1");
//        self.backgroundColor = [UIColor redColor];

        _bgView = [[UIView alloc] initWithFrame:CGRectMake(5/WIDTH_5S_SCALE, 0, SCREEN_WIDTH-10/WIDTH_5S_SCALE, kShopOrderListCellHeight)];
        _bgView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.bgView];
        
        _title = [[UILabel alloc]initWithFrame:CGRectMake(5/WIDTH_5S_SCALE, 0, (SCREEN_WIDTH-2*10/WIDTH_5S_SCALE)/2, kShopOrderListCellHeight-1)];
        _title.numberOfLines = 2;
        _title.font = DEF_FontSize_14;
         [self.bgView addSubview:_title];
        
        _content = [[UILabel alloc]initWithFrame:CGRectMake(_title.right, 0, (SCREEN_WIDTH-2*10/WIDTH_5S_SCALE)/2, kShopOrderListCellHeight-1)];
        _content.numberOfLines = 2;
        _content.font = DEF_FontSize_14;
        _content.textAlignment = NSTextAlignmentRight;
        [self.bgView addSubview:_content];
        
        _line = [[UIView alloc] initWithFrame:CGRectMake(10/WIDTH_5S_SCALE, kShopOrderListCellHeight-1/WIDTH_5S_SCALE, SCREEN_WIDTH-20/WIDTH_5S_SCALE, 0.5)];
        _line.backgroundColor = getColor(dividerColor);
        [self.bgView addSubview:self.line];
    }
    return self;
}
- (void)setTitle:(NSString *)title content:(NSString *)content
      titleColor:(UIColor *)titleColor contentColor:(UIColor *)contentColor
{
    _title.text = title;
    _content.text = content;
    _title.textColor = titleColor;
    _content.textColor = contentColor;

}
@end
